// Copyright 2025 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by sidekick. DO NOT EDIT.
use crate::Result;

/// Implements a [NetApp](super::stub::NetApp) decorator for logging and tracing.
#[derive(Clone, Debug)]
pub struct NetApp<T>
where
    T: super::stub::NetApp + std::fmt::Debug + Send + Sync,
{
    inner: T,
}

impl<T> NetApp<T>
where
    T: super::stub::NetApp + std::fmt::Debug + Send + Sync,
{
    pub fn new(inner: T) -> Self {
        Self { inner }
    }
}

impl<T> super::stub::NetApp for NetApp<T>
where
    T: super::stub::NetApp + std::fmt::Debug + Send + Sync,
{
    #[tracing::instrument(ret)]
    async fn list_storage_pools(
        &self,
        req: crate::model::ListStoragePoolsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::ListStoragePoolsResponse>> {
        self.inner.list_storage_pools(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn create_storage_pool(
        &self,
        req: crate::model::CreateStoragePoolRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.create_storage_pool(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn get_storage_pool(
        &self,
        req: crate::model::GetStoragePoolRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::StoragePool>> {
        self.inner.get_storage_pool(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn update_storage_pool(
        &self,
        req: crate::model::UpdateStoragePoolRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.update_storage_pool(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn delete_storage_pool(
        &self,
        req: crate::model::DeleteStoragePoolRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.delete_storage_pool(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn validate_directory_service(
        &self,
        req: crate::model::ValidateDirectoryServiceRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.validate_directory_service(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn switch_active_replica_zone(
        &self,
        req: crate::model::SwitchActiveReplicaZoneRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.switch_active_replica_zone(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn list_volumes(
        &self,
        req: crate::model::ListVolumesRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::ListVolumesResponse>> {
        self.inner.list_volumes(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn get_volume(
        &self,
        req: crate::model::GetVolumeRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::Volume>> {
        self.inner.get_volume(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn create_volume(
        &self,
        req: crate::model::CreateVolumeRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.create_volume(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn update_volume(
        &self,
        req: crate::model::UpdateVolumeRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.update_volume(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn delete_volume(
        &self,
        req: crate::model::DeleteVolumeRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.delete_volume(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn revert_volume(
        &self,
        req: crate::model::RevertVolumeRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.revert_volume(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn list_snapshots(
        &self,
        req: crate::model::ListSnapshotsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::ListSnapshotsResponse>> {
        self.inner.list_snapshots(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn get_snapshot(
        &self,
        req: crate::model::GetSnapshotRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::Snapshot>> {
        self.inner.get_snapshot(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn create_snapshot(
        &self,
        req: crate::model::CreateSnapshotRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.create_snapshot(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn delete_snapshot(
        &self,
        req: crate::model::DeleteSnapshotRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.delete_snapshot(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn update_snapshot(
        &self,
        req: crate::model::UpdateSnapshotRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.update_snapshot(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn list_active_directories(
        &self,
        req: crate::model::ListActiveDirectoriesRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::ListActiveDirectoriesResponse>> {
        self.inner.list_active_directories(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn get_active_directory(
        &self,
        req: crate::model::GetActiveDirectoryRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::ActiveDirectory>> {
        self.inner.get_active_directory(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn create_active_directory(
        &self,
        req: crate::model::CreateActiveDirectoryRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.create_active_directory(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn update_active_directory(
        &self,
        req: crate::model::UpdateActiveDirectoryRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.update_active_directory(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn delete_active_directory(
        &self,
        req: crate::model::DeleteActiveDirectoryRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.delete_active_directory(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn list_kms_configs(
        &self,
        req: crate::model::ListKmsConfigsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::ListKmsConfigsResponse>> {
        self.inner.list_kms_configs(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn create_kms_config(
        &self,
        req: crate::model::CreateKmsConfigRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.create_kms_config(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn get_kms_config(
        &self,
        req: crate::model::GetKmsConfigRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::KmsConfig>> {
        self.inner.get_kms_config(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn update_kms_config(
        &self,
        req: crate::model::UpdateKmsConfigRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.update_kms_config(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn encrypt_volumes(
        &self,
        req: crate::model::EncryptVolumesRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.encrypt_volumes(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn verify_kms_config(
        &self,
        req: crate::model::VerifyKmsConfigRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::VerifyKmsConfigResponse>> {
        self.inner.verify_kms_config(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn delete_kms_config(
        &self,
        req: crate::model::DeleteKmsConfigRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.delete_kms_config(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn list_replications(
        &self,
        req: crate::model::ListReplicationsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::ListReplicationsResponse>> {
        self.inner.list_replications(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn get_replication(
        &self,
        req: crate::model::GetReplicationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::Replication>> {
        self.inner.get_replication(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn create_replication(
        &self,
        req: crate::model::CreateReplicationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.create_replication(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn delete_replication(
        &self,
        req: crate::model::DeleteReplicationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.delete_replication(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn update_replication(
        &self,
        req: crate::model::UpdateReplicationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.update_replication(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn stop_replication(
        &self,
        req: crate::model::StopReplicationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.stop_replication(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn resume_replication(
        &self,
        req: crate::model::ResumeReplicationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.resume_replication(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn reverse_replication_direction(
        &self,
        req: crate::model::ReverseReplicationDirectionRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.reverse_replication_direction(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn establish_peering(
        &self,
        req: crate::model::EstablishPeeringRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.establish_peering(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn sync_replication(
        &self,
        req: crate::model::SyncReplicationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.sync_replication(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn create_backup_vault(
        &self,
        req: crate::model::CreateBackupVaultRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.create_backup_vault(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn get_backup_vault(
        &self,
        req: crate::model::GetBackupVaultRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::BackupVault>> {
        self.inner.get_backup_vault(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn list_backup_vaults(
        &self,
        req: crate::model::ListBackupVaultsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::ListBackupVaultsResponse>> {
        self.inner.list_backup_vaults(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn update_backup_vault(
        &self,
        req: crate::model::UpdateBackupVaultRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.update_backup_vault(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn delete_backup_vault(
        &self,
        req: crate::model::DeleteBackupVaultRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.delete_backup_vault(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn create_backup(
        &self,
        req: crate::model::CreateBackupRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.create_backup(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn get_backup(
        &self,
        req: crate::model::GetBackupRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::Backup>> {
        self.inner.get_backup(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn list_backups(
        &self,
        req: crate::model::ListBackupsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::ListBackupsResponse>> {
        self.inner.list_backups(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn delete_backup(
        &self,
        req: crate::model::DeleteBackupRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.delete_backup(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn update_backup(
        &self,
        req: crate::model::UpdateBackupRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.update_backup(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn create_backup_policy(
        &self,
        req: crate::model::CreateBackupPolicyRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.create_backup_policy(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn get_backup_policy(
        &self,
        req: crate::model::GetBackupPolicyRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::BackupPolicy>> {
        self.inner.get_backup_policy(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn list_backup_policies(
        &self,
        req: crate::model::ListBackupPoliciesRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::ListBackupPoliciesResponse>> {
        self.inner.list_backup_policies(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn update_backup_policy(
        &self,
        req: crate::model::UpdateBackupPolicyRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.update_backup_policy(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn delete_backup_policy(
        &self,
        req: crate::model::DeleteBackupPolicyRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.delete_backup_policy(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn list_quota_rules(
        &self,
        req: crate::model::ListQuotaRulesRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::ListQuotaRulesResponse>> {
        self.inner.list_quota_rules(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn get_quota_rule(
        &self,
        req: crate::model::GetQuotaRuleRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<crate::model::QuotaRule>> {
        self.inner.get_quota_rule(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn create_quota_rule(
        &self,
        req: crate::model::CreateQuotaRuleRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.create_quota_rule(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn update_quota_rule(
        &self,
        req: crate::model::UpdateQuotaRuleRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.update_quota_rule(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn delete_quota_rule(
        &self,
        req: crate::model::DeleteQuotaRuleRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.delete_quota_rule(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn list_locations(
        &self,
        req: location::model::ListLocationsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<location::model::ListLocationsResponse>> {
        self.inner.list_locations(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn get_location(
        &self,
        req: location::model::GetLocationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<location::model::Location>> {
        self.inner.get_location(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn list_operations(
        &self,
        req: longrunning::model::ListOperationsRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::ListOperationsResponse>> {
        self.inner.list_operations(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn get_operation(
        &self,
        req: longrunning::model::GetOperationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<longrunning::model::Operation>> {
        self.inner.get_operation(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn delete_operation(
        &self,
        req: longrunning::model::DeleteOperationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<()>> {
        self.inner.delete_operation(req, options).await
    }

    #[tracing::instrument(ret)]
    async fn cancel_operation(
        &self,
        req: longrunning::model::CancelOperationRequest,
        options: gax::options::RequestOptions,
    ) -> Result<gax::response::Response<()>> {
        self.inner.cancel_operation(req, options).await
    }

    fn get_polling_error_policy(
        &self,
        options: &gax::options::RequestOptions,
    ) -> std::sync::Arc<dyn gax::polling_error_policy::PollingErrorPolicy> {
        self.inner.get_polling_error_policy(options)
    }

    fn get_polling_backoff_policy(
        &self,
        options: &gax::options::RequestOptions,
    ) -> std::sync::Arc<dyn gax::polling_backoff_policy::PollingBackoffPolicy> {
        self.inner.get_polling_backoff_policy(options)
    }
}
